﻿

'终端启停记录
Public Class StartUpTypeItem
    Inherits StartUpTypeItem(Of StartUpDetailTypeItem)

End Class

'终端启停记录(泛型)
Public Class StartUpTypeItem(Of T1 As {StartUpDetailTypeItem, New})
    Inherits StartUpTypeBase

    Public Sub New()
        _DetailItemList = New List(Of T1)
    End Sub

    Private _DetailItemList As IList(Of T1) '明细记录
    Public Overridable ReadOnly Property DetailItemList() As IList(Of T1)
        Get
            Return _DetailItemList
        End Get
    End Property

End Class

'终端启停记录(基类)
Public Class StartUpTypeBase

    Private _ID As Integer '主键
    Public Property ID() As Integer
        Get
            Return _ID
        End Get
        Set(ByVal value As Integer)
            _ID = value
        End Set
    End Property

    Private _NetID As Integer '网络标识
    Public Property NetID() As Integer
        Get
            Return _NetID
        End Get
        Set(ByVal value As Integer)
            _NetID = value
        End Set
    End Property

    Private _BeginTime As DateTime '启动时间
    Public Property BeginTime() As DateTime
        Get
            Return _BeginTime
        End Get
        Set(ByVal value As DateTime)
            _BeginTime = value
        End Set
    End Property

    Private _EndTime As DateTime '停止时间
    Public Property EndTime() As DateTime
        Get
            Return _EndTime
        End Get
        Set(ByVal value As DateTime)
            _EndTime = value
        End Set
    End Property

    Private _PageIndex As Integer '数据存储页地址
    Public Property PageIndex() As Integer
        Get
            Return _PageIndex
        End Get
        Set(ByVal value As Integer)
            _PageIndex = value
        End Set
    End Property

    Private _PageCount As Integer '数据存储页数
    Public Property PageCount() As Integer
        Get
            Return _PageCount
        End Get
        Set(ByVal value As Integer)
            _PageCount = value
        End Set
    End Property

    Private _RecordInterval As Integer '数据存储间隔
    Public Property RecordInterval() As Integer
        Get
            Return _RecordInterval
        End Get
        Set(ByVal value As Integer)
            _RecordInterval = value
        End Set
    End Property

    Private _BeginAddress As String '出发地
    Public Property BeginAddress() As String
        Get
            Return _BeginAddress
        End Get
        Set(ByVal value As String)
            _BeginAddress = value
        End Set
    End Property

    Private _EndAddress As String '目的地
    Public Property EndAddress() As String
        Get
            Return _EndAddress
        End Get
        Set(ByVal value As String)
            _EndAddress = value
        End Set
    End Property

    Private _Shipper As String '发货人
    Public Property Shipper() As String
        Get
            Return _Shipper
        End Get
        Set(ByVal value As String)
            _Shipper = value
        End Set
    End Property

    Private _Carrier As String '承运人
    Public Property Carrier() As String
        Get
            Return _Carrier
        End Get
        Set(ByVal value As String)
            _Carrier = value
        End Set
    End Property

    Private _Receiver As String '收货人
    Public Property Receiver() As String
        Get
            Return _Receiver
        End Get
        Set(ByVal value As String)
            _Receiver = value
        End Set
    End Property

    Private _UploadStatus As StartUploadStatus = StartUploadStatus.NotUpload '历史数据上传状态
    Public Property UploadStatus() As StartUploadStatus
        Get
            Return _UploadStatus
        End Get
        Set(ByVal value As StartUploadStatus)
            _UploadStatus = value
        End Set
    End Property

    Private _LastRecordTime As DateTime '历史数据最后上传纪录中的时间
    Public Property LastRecordTime() As DateTime
        Get
            Return _LastRecordTime
        End Get
        Set(ByVal value As DateTime)
            _LastRecordTime = value
        End Set
    End Property

    Private _LastPageIndex As Integer '历史数据最后上传的页数
    Public Property LastPageIndex() As Integer
        Get
            Return _LastPageIndex
        End Get
        Set(ByVal value As Integer)
            _LastPageIndex = value
        End Set
    End Property

    Private _LastPageType As StartUploadPageType '历史数据最后上传页数的类型(上半页,下半页)
    Public Property LastPageType() As StartUploadPageType
        Get
            Return _LastPageType
        End Get
        Set(ByVal value As StartUploadPageType)
            _LastPageType = value
        End Set
    End Property

    Private _SeqNo As Integer
    Public Property SeqNo() As Integer
        Get
            Return _SeqNo
        End Get
        Set(ByVal value As Integer)
            _SeqNo = value
        End Set
    End Property

End Class

'历史数据上传状态
Public Enum StartUploadStatus
    NotUpload = 0   '未上传
    NotFinished = 1 '未完成
    Uploading = 2   '上传中(目前只用于表示行状态，不存于数据库中)
    Finished = 3    '完成
    [UploadError] = 4 '上传错误
    [Error] = 5     '错误纪录
    NotStop = 6     '尚未停止
End Enum

'上传页数的类型
Public Enum StartUploadPageType
    HalfUp = 1      '上半页
    HalfDown = 2    '下半页
End Enum